package com.example.demolearn.controller;


import com.example.demolearn.aspect.HttpLog;
import com.example.demolearn.myself.MyTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.LinkedHashMap;

@RestController
@RequestMapping("/common")
public class CommonController {

    @Autowired
    private MyTest myTest;
    @GetMapping("/hi")
    @HttpLog
    public String sayHi(@RequestParam(value = "name",defaultValue = "123")String name){
        HashMap<Object, Object> map = new HashMap<>();
        map.put("name","1");
        map.put("name1","2");
        map.put("name2","3");
        map.put("name3","4");
        map.put("name4","5");
        map.put("name5","6");
        map.put("name6","7");
        map.put("name7","8");
        map.put("name8","9");
        map.put("name9","10");
        map.put("name11","11");
        map.put("name12","12");
        map.put("name13","13");
        map.put("name14","14");
        myTest.hello();
        return "hi";
    }
}
